package com.style_transfer.service.impl;

import com.style_transfer.dao.TransferDao;
import com.style_transfer.model.Image;
import com.style_transfer.model.ImageStyle;
import com.style_transfer.model.Location;
import com.style_transfer.model.Style;
import com.style_transfer.service.TransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TransferServiceImpl implements TransferService {
    @Autowired
    private TransferDao transferDao;

    @Override
    public ImageStyle getImageStyle(Image image, Style style) {
        return transferDao.getImageStyle(image.getIm_id(),style.getS_id());
    }

    @Override
    public ImageStyle getImageStyleByName(Location location, Style style) {
        return transferDao.getImageStyleByName(location.getL_name(),style.getS_id());
    }
}
